<style>
#load{
    width:100%;
    height:100%;
    position:fixed;
    z-index:9999;
    background:url("images/loading_bar.gif") no-repeat center center #fff;
}
</style>
<script>
/*
document.onreadystatechange = function () {
	var path = window.location.href;
	path = path.replace(/\/$/, "");
    path = decodeURIComponent(path);
	var pageUrl		=	path;
	sessionStorage.setItem( 'pageUrl', JSON.stringify(pageUrl) );
  
  var state = document.readyState
  if (state == 'interactive') {
       document.getElementById('contents').style.visibility="hidden";
  } else if (state == 'complete') {
      setTimeout(function(){
	   if(typeof sessionStorage["admin_user_id"]!='undefined'){
	   //alert(sessionStorage["admin_user_id"]);return false;
	   		document.getElementById('interactive');
			document.getElementById('load').style.visibility="hidden";
			document.getElementById('contents').style.visibility="visible";
		 }else{
		 
			window.location="index.html";
		 }
      },400);
  }
}
*/
</script>
<script>
/*
$(window).load(function(){ 
	$('#sidemenu').load('side-menu.html');
	$('#header').load('header.html');
	$('#footer').load('footer.html');
	var user_id = JSON.parse(sessionStorage["admin_user_id"]);
	var email = JSON.parse(sessionStorage["admin_email"]);
	$.ajax({
		type		:	'GET',
		url			:  	webServiceUrl+'registration/'+user_id,
		dataType	: 	"json",
		success: function(data){
		    //var countrydetailes;
		    //var user_statedetailes;
            //var statedetailes;
			var obj = eval("(" + data.data + ")");
			$.each(obj, function (index,Object) {
				$('#inputUser').val(Object.user_name);
				$('#inputEmail').val(Object.email);
				$('#inputPh').val(Object.phone);
				$('#alterphone').val(Object.alterphone);
				$('#location').val(Object.location);
				$('#txtArea').val(Object.address);
				$('#pincode').val(Object.pincode);
				$('#hid').val(user_id);
				$('#fax').val(Object.fax);
				$('#city').val(Object.city);
				var user_countrydetailes=Object.country;
				var user_statedetailes=Object.state;
				$('#hidstate').val(user_statedetailes);
				$.ajax({
					type		:	'GET',
					url			:  	webServiceUrl+'country',
					dataType	:   "json",
					success: function(data){
							var countrydetailes;
							countrydetailes +='<option value="">Select country</option>';
							var obj = eval("(" + data.data + ")");
							$.each(obj, function (index,Object) {
								if(user_countrydetailes==Object.country_id){
								  countrydetailes +='<option  selected value="'+Object.country_id+'">'+Object.nicename+'</option>';
								}else{
								  countrydetailes +='<option  value="'+Object.country_id+'">'+Object.nicename+'</option>';
								}
							});
							$('#country').html(countrydetailes);
							getstateValues();
					}
				});
				
			});	
		}
	});
});
*/
</script>

<div class="container-fluid">
  <div class="row-fluid container_bg">
    	<div ng-include="'side-menu.html'"></div>
	<div class="span9 pos_r">
		<div class="container_title">
			<div class=""><h1>My Account</h1></div>
			<div  id="success_alert" class="alert_sucess alert alert-success span11" style="display:none;">
				<i class=" icon-ok-sign"></i>&nbsp;&nbsp;
				<span>{{ successDiv }}</span>
			</div>
			<div class="container_form_top" ng-repeat="p in posts">
			<form class="form-horizontal" id="accountForm1" method="POST" name="adminAccForm" ng-submit="adminAccountProces(adminAccForm)">
				<div class="control-group">
					<label class="control-label" for="username">User Name</label>
					<div class="controls">
					<input type="text" class="span8" id="inputUser" name="username"   placeholder="User Name" value="{{ p.user_name }}" required ng-model="p.user_name">
					<span class="error" ng-show="adminAccForm.username.$error.required"></span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="email">Email</label>
					<div class="controls">
					<input type="email" class="span8" id="inputEmail" name="email" placeholder="Email" disabled value="{{ p.email }}" ng-model="p.email">
					<span class="error" ng-show="adminAccForm.email.$error.required"></span>
					<span class="error" ng-show="adminAccForm.email.$error.email"></span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="phone">Phone Number</label>
					<div class="controls">
					<input type="text" class="span8" id="inputPh" name="phone" placeholder="Phone Number" value="{{ p.phone }}" ng-model="p.phone" required >
					<span class="error" ng-show="adminAccForm.phone.$error.required"></span>
					<span class="error" ng-show="adminAccForm.phone.$error.$invalid">Numbers only</span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="alterphone">Alterphonenumber</label>
					<div class="controls">
					<input type="text" class="span8" id="alterphone" name="alterphone" placeholder="Please Enter Telephone Number" value="{{ p.alterphone }}" ng-model="p.alterphone" required>
					<span class="error" ng-show="adminAccForm.alterphone.$error.required"></span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="location">Location</label>
					<div class="controls">
					<input type="text" class="span8" id="location" name="location" placeholder="Please Enter location" value="{{ p.location }}" ng-model="p.location" required>
					<span class="error" ng-show="adminAccForm.location.$error.required"></span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="address">Address</label>
					<div class="controls">
					<textarea rows="3" class="span8" id="txtArea" name="address" required ng-model="p.address">{{ p.address }}</textarea>
					<span class="error" ng-show="adminAccForm.address.$error.required"></span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="pincode">Pincode</label>
					<div class="controls">
					<input type="text" class="span8" id="pincode" name="pincode" placeholder="Please Enter pincode" value="{{ p.pincode }}" ng-model="p.pincode" required>
					<span class="error" ng-show="adminAccForm.pincode.$error.required"></span>
					</div>
				</div>
				<!--<div class="control-group">
					<label class="control-label" for="fax">Fax</label>
					<div class="controls">
					<input type="text" class="span8" id="fax" name="fax" placeholder="Please Enter fax">
					<span id="errorFax" name="errorFax" style="color:red"></span>
					</div>
				</div>
				
				
				<div class="control-group">
					<label class="control-label" for="city">City</label>
					<div class="controls">
					<input type="text" class="span8" id="city" name="city" placeholder="Please Enter city">
					<span id="errorCity" name="errorCity" style="color:red"></span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="country">Country</label>
					<div class="controls">
					<select class="span8" id="country" name="country" onchange="return getstateValues()"   placeholder="Select Country">
					</select>
					<span id="errorcountry" name="errorcountry" style="color:red"></span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="state">State</label>
					<div class="controls">
					<select class="span8" id="state" name="state" placeholder="">
					</select>
					<span id="errorstate" name="errorstate" style="color:red"></span>
					</div>
				</div>-->
				<input type="hidden" id="hid" name="hid" value="{{ p.user_id }}" ng-model="p.user_id">
				<input type="hidden" id="status" name="status" value="1">
				<div class="control-group">
					<div class="controls">
					<input type="submit" id="submit" value="SAVE"><span ng-bind-html="accloading"></span>
					</div>
				</div>
			</form>
			
			</div>
		</div>
	  
	</div><!--/span-->
  </div><!--/row-->
</div><!--/.fluid-container-->
